package com.webbei.Backstage.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class LoginInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation ai) throws Exception {
		ActionContext ac = ai.getInvocationContext();
		Object obj = ac.getSession().get("mana");
		if(obj!=null){
			return ai.invoke();
		}else{
			return "login";
		}
	}

}
